<template>
  <view class="container">
    <uni-nav-bar left-icon="back" title="我的优惠券" />
    <view class="coupon-list">
      <view v-for="coupon in coupons" :key="coupon.id" class="coupon-item">
        <text class="amount">{{coupon.amount}}元</text>
        <text class="condition">满{{coupon.minAmount}}元可用</text>
        <text class="expiry">有效期至: {{coupon.expiry}}</text>
      </view>
      <view v-if="coupons.length === 0">暂无优惠券</view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      coupons: []
    };
  },
  onLoad() {
    this.loadCoupons();
  },
  methods: {
    async loadCoupons() {
      // TODO: 调用API获取优惠券数据
      this.coupons = [
        {id: 1, amount: 10, minAmount: 100, expiry: '2023-12-31'}
      ];
    }
  }
}
</script>

<style>
.container { height: 100vh; }
.coupon-list { padding: 10px; }
.coupon-item { background: #fff; border-radius: 8px; padding: 15px; margin-bottom: 10px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.amount { font-size: 24px; color: #ff5500; font-weight: bold; }
.condition, .expiry { font-size: 14px; color: #666; }
</style>